package com.zhiyou.ajax.controller;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhiyou.ajax.model.TestModel;
import com.zhiyou.ajax.service.TestService;

@Controller
@RequestMapping("/")
public class TestController {
	
	@Autowired
	TestService testService;
	
	@RequestMapping("index.do")
	public String index(Model model){
		List<TestModel> list=testService.queryTests();
		model.addAttribute("results", list);
		return "test";
	}
	
	@ResponseBody
	@RequestMapping("check.do")
	public String check(){
		HashMap map=new HashMap();
		
		return "";
	}
		
}
